#include<iostream>
using namespace std;


class baza
{
protected:
	char * transmisie;
	char * culoare;
	// char * nume
	//float pret;
public:	
	baza(char *t, char *c);
	virtual void afisare(){}
	//virtual char* get_expirare(){return"0";}
	char *get_culoare(){return culoare;}
};

class sedan:public baza
{
	char * navigatie;
	char * siguranta;
	char * antidemaraj;
	// char * expira


public:
	sedan(char *t, char *c,char *nav, char *sig, char *ant):baza(t,c)
	{
		navigatie=new char[strlen(nav)+1];
		strcpy(navigatie,nav);
		siguranta=new char[strlen(sig)+1];
		strcpy(siguranta,sig);
		antidemaraj=new char[strlen(ant)+1];
		strcpy(antidemaraj,ant);
	}

	char* get_navigatie(){return navigatie;}
	char* get_siguranta(){return siguranta;}
	char* get_antidemaraj(){return antidemaraj;}

	void afisare();

};

class coupe:public baza
{
	char * plafon;
	char * jenti;
	int garantie;
public:
	coupe(char *t,char *c,char * plaf, char * jen,int g):baza(t,c)
	{
		plafon=new char[strlen(plaf)+1];
		strcpy(plafon,plaf);
		jenti =new char[strlen(jen)+1];
		strcpy(jenti,jen);
		garantie=g;
	}

	void afisare();
	char *get_plafon(){ return plafon;}
	char *get_jenti(){return jenti;}
	int get_garantie(){return garantie;}
};


class mini:public baza
{
	char * motorizare;
	char * lungime;
	float consum;
public:
	mini(char *t,char *c,char * mot, char * lun,int cons):baza(t,c)
	{
		motorizare=new char[strlen(mot)+1];
		strcpy(motorizare,mot);
		lungime =new char[strlen(lun)+1];
		strcpy(lungime,lun);
		consum = cons;
	}

	void afisare();
	char *get_motorizare(){ return motorizare;}
	char *get_lungime(){return lungime;}
	float get_consum(){return consum;}
};

class client
{
	char *nume;
	int varsta;
	baza *v[20];
	int nr;

public:
	client();
	client(char *n, int v);
	void add_car(char *t,char *c,char *n, char *s, char *a);//Sedan
	void add_car(char *t,char *c,char *p, char *j, int g);//Coupe
	void add_car(char *t,char *c,char * m, char *lun, float con);//Mini
	void afisare();
	void del_produs(char *n);
	void print_expirat(char *n);
};


class Manager{
	char * nume_dealer;
	client *v[10];
	int nr;
	
	static bool instanceFlag;
    static Manager *single;
    Manager()
    {
        nume_dealer=new char[strlen("Tiriac_auto")+1];
		strcpy(nume_dealer,"Tiriac_auto");
		nr=0;
    }

	Manager (char *n){
		nume_dealer=new char[strlen(n)+1];
		strcpy(nume_dealer,n);
		nr=0;
	}

public:
    static Manager* getInstance();
    void add_client(char *n, int vr);
	void afisare();
    ~Manager()
    {
        instanceFlag = false;
    }


};

class exceptie
{
	char *eroare;
public:
	exceptie(char *e)
	{
		eroare=new char[strlen(e)+1];
		strcpy(eroare,e);
	}

	void af_eroare()
	{
		cout<<eroare;
	}
};